﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Frame_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            DataTable dt = Class1.ExecSel("select top 5 ad_Lock,ad_Url,ad_Img,ad_Location,ad_Time from AD where ad_Location=4 order by ad_ID desc");
            if (dt.Rows[0]["ad_Lock"].ToString() == "0")
            {
                Repeater1.DataSource = dt;
                Repeater1.DataBind();
            }

        }
    }
}
